﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Zeny.Business.ExpSample.Service;
using Spring.Context.Support;
using Zeny.Data.Domain.Exp;
using log4net;


namespace Zeny.UI
{
    public partial class Form1 : Form
    {

        private IUserService userService;

        private static readonly ILog log = LogManager.GetLogger(typeof(Form1));
        
        public Form1()
        {
            InitializeComponent();
            userService = ContextRegistry.GetContext()["userService"] as IUserService;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            UserEntity user = userService.Get("00011a2ccfb642b6964f7e0709152af6");

            log.Info(user.ToString());
            log.Info(user.name);

            user.name = "测试111";

            log.Info(user.name);

            userService.Update(user);
        }
    }
}
